package com.hyper_yang._04_jvm.chap04;
public class StackDemo {
    public static void main(String[] args) {
        System.out.println("main()开始"); //动态连接
        StackDemo test = new StackDemo();
        test.method2();
        System.out.println("main()结束");
    }

    //int i = 0;

    public void method2() {
        int i = 1; //本地变量表
        i++;
        int j = 1; //本地变量表
        int s = i + j * 2 + i; //操作数栈
        //Car car = new Car();
        System.out.println("method2()执行...");
        this.method3();
        System.out.println("method2()结束...");
        //int i = 1/0;
        //return ; //方法返回地址  正常返回或异常返回
    }

    public void method3() {
        System.out.println("method3()执行...");
        this.method4();
        System.out.println("method3()结束...");
    }

    public void method4() {
        System.out.println("method4()执行...");
        System.out.println();
        System.out.println("method4()结束...");

    }
}
